

<link rel="stylesheet" href="__CSS__/mall.css"/>
<script src="__STATIC__/js/jquery-2.1.1.min.js"></script>
<script src="__STATIC__/js/ace-extra.min.js"></script>
<script src="__STATIC__/js/laydate.js"></script>



<div class="page-header mbx">
    <h1>
        <small>
            {$companyName}分公司管理 ｜分红管理 <i class="ace-icon fa fa-times xx"></i>
        </small>
    </h1>
</div>
<div class="mbx" style="padding-bottom: 200px;">
    <div class="widget-box transparent">
       <!-- <div class="nav-tab" style="position: relative">
            <ul class="nav-tab-title ">
                <li class="nav-this">分红管理</li>
            </ul>
        </div>-->
        <div class="nav-tab" style="position: relative">
            <ul class="nav-tab-title ">
                <li class="nav-this">股东分红</li>
                <li><a href="{:url('stockmoneyallotlist')}">分红记录</a></li>
            </ul>
        </div>

        <div class="widget-body">
            <div class="widget-main padding-10">
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal s_input-bgcolor" method="post" action="/admin/Profit/index">
                                <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-1-1">用户名： </label>
                                        <div class="col-sm-8">
                                            <input type="text" id="form-field-1-1"  name="uname" value="{$postArr.uname}"  placeholder="请输入用户名" class="form-control">
                                        </div>
                                    </div>
                                </div>

                            <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-1-2">真实姓名： </label>
                                    <div class="col-sm-8">
                                        <input type="text" id="form-field-1-2" name="tname" value="{$postArr.tname}" placeholder="请输入真实姓名" class="form-control">
                                    </div>
                                </div>
                            </div>

                                <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 ">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label text-right no-padding-right">分红时间： </label>
                                        <div class="col-sm-8">
                                            <div class="input-daterange input-group">
                                                <input type="text" class="input-sm form-control hm-shop-upgrade" placeholder="开始时间" name="start" id="start" value="{$postArr.start}">
                                                <span class="input-group-addon" style="background: none;border: none;">
																	-
																</span>
                                                <input type="text" class="input-sm form-control hm-shop-upgrade" placeholder="结束时间" name="end" id="end" value="{$postArr.end}">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="text-right">
                                    <button class="btn " style="width: 120px; border-radius: 2rem; background: #fba40a!important;border-color: #fba40a;margin-left: 20px;">查询</button>
                                    <button class="btn " type="button" onclick="applying();" style="width: 120px; border-radius: 2rem; background: #0451d7!important;border-color: #0451d7;margin-left: 20px;">提交分红</button>
                                </div>
                        </form>
                        <div >
                            <div class="row fgs-amount">
                                <div class="col-lg-3 col-md-3 col-sm-3">公司总收益：<span class="fgs-profit">{$companySum}<div
                                        class="fgs-profit-div">
                                            <h2>{$companyName}分公司收益汇总：</h2>
                                            <ul>
                                                <li>藏宝收益：<span>{$cbSum}</span></li>
                                                <li>商城收益：<span>{$scSum}</span></li>
                                                <li>其他收益：<span>{$tjSum}</span></li>
                                                <li>直播收益：<span>{$zbSum}</span></li>
                                                <li>游戏收益：<span>{$yxSum}</span></li>
                                            </ul>
                                        </div></span>元
                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-3">可分红金额：<span
                                        class="fgs-profit">{$allotMoney}</span>元
                                </div>


                                <div class="col-lg-3 col-md-3 col-sm-3">沉淀资金：<span
                                        class="fgs-profit">{$leftMoney}</span>元
                                </div>

                            </div>
                            <div class="space"></div>
                            <div class="row">
                                <div class="col-xs-12">
                                    <table id="sample-table-1" class="table table-hover" width="100%"
                                           style="table-layout:fixed">
                                        <thead>
                                        <tr>
                                            <th class="left">用户名</th>
                                            <th class="left">真实姓名</th>
                                            <th class="left">股东类型</th>
                                            <th class="left">占股比例</th>
                                            <th class="left">分红比例</th>
                                            <th class="left">分红金额</th>
                                            <th class="left">上次分红时间</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {empty name="resList"}
                                        <tr class="s_tr-vertical">
                                            <td colspan="7" class="center" style="color: red;">没有查询到结果</td>
                                        </tr>
                                        {/empty}
                                        {volist name="resList" id="vo"}
                                            <tr class="s_tr-vertical s_tr-border s_shoplist-first">
                                                <td>{$vo.username}</td>
                                                <td>{$vo.truename}</td>
                                                <td class="s_shop-input left">{$stockRes[$vo.stocktypeid]}</td>
                                                <td class="left">{$vo.stocknum}%</td>
                                                <td class="left">{$vo.allot_per}</td>
                                                <td class="left">{$vo.money}</td>
                                                <td class="left">{$vo.addtime}</td>
                                            </tr>
                                        {/volist}
                                        </tbody>
                                    </table>
                                </div>
                                <!-- /.span -->
                            </div>
                            <!-- /.row -->
                        </div>

                    </div>
                    <!-- /.col -->
                </div>
            </div>
        </div>
    </div>
    <div class="text-center">
        {$pageShow}
    </div>

</div>


<script type="text/javascript">
    laydate.render({
        elem: '#start' //指定元素
    });
    laydate.render({
        elem: '#end' //指定元素
    });

    //提交申请
    function applying() {
        $.popup({
            content: '您确定要提交申请吗？',
            cls: 'fa-question',
            callback: function () {
                this.close();
                $.post("/admin/profit/apply",function (msg) {
                    if (msg) {
                        $.popup({
                            content: msg,
                            cls: 'fa-question',
                            btns:['取消'],
                        });
                    }
                });
            }
        });
        return;
    }
</script>